//
//  OtherViewController.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/6.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "OtherViewController.h"
#import "FreeTravelMacro.h"
#import "FreeTravelNetwork.h"
@interface OtherViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@end

@implementation OtherViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self handleData];
    [self createTableView];
}
- (void)createTableView{
    self.tableView = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
    [self.view addSubview:self.tableView];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool"];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool"];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool"];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool"];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool"];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool"];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 6;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"pool"];
    return cell;
}
- (void)handleData{
    [FreeTravelNetwork GET:[NSString stringWithFormat:@"http://open.qyer.com/qyer/footprint/poi_detail?client_id=qyer_ios&client_secret=cd254439208ab658ddf9&count=20&page=1&poi_id=%ld&screensize=640&track_app_channel=App%%2520Store&track_app_version=7.0.1&track_device_info=iPhone%%25205s&track_deviceid=E9CA001A-5603-4CA8-B2EA-2BE34F691AC6&track_os=ios%%25209.3.4&v=1",self.ID] andBody:nil andHeader:nil andResponse:ZWYJSON andSuccessBlock:^(id result) {
        
        
        
        
        [self.tableView reloadData];
    } andFailureBlock:^(NSError *error) {
        
    }];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
